home *** CD-ROM | disk | FTP | other *** search
/ Nautilus 1992 July / Nautilus-3-8 / Nautilus-3-8.bin / Tools & Utilities / Techy Stuff / Source ƒ / Filelist ƒ / About Default next >
Encoding:
Text File  |  1990-09-01  |  5.5 KB  |  118 lines

  1.  
  2. About Default 2.1
  3. ⌐1990╩Lim Unlimited ╤ All Rights Reserved
  4.  
  5. The Default CDEF is a simple aid for Macintosh programmers that draws
  6. default button outlines for any size buttons, in the proper color, in your
  7. application and in ResEdit dialog and alert templates. Push buttons, check
  8. boxes, and radio buttons can also be drawn using the window╒s font.
  9.  
  10. ___Instructions___
  11.  
  12. Default is a control definition function that you can copy and paste into
  13. your application. The Default CDEF enhances the System file╒s standard
  14. control definition 0. If the last character of a button╒s title is an ╘@╒
  15. (an at or an each symbol), the button is drawn with an outline indicating
  16. that it is the default button. The trailing ╘@╒ is not drawn with the
  17. title.
  18.  
  19. If the button is inactive, the outline is grayed out. When Color QuickDraw
  20. is available, outlines are drawn in the same color as the button╒s frame.
  21. If the Default CDEF is in the same file as your application╒s DITL
  22. resources, ResEdit will display default button outlines drawn by Default.
  23. You do not need to write any code to use Default.
  24.  
  25. A dialog╒s default button can be changed at any time in your application
  26. simply by changing the appropriate button titles. However, you, the
  27. programmer, are responsible for making sure there is only one default
  28. button. If you are not using a filterProc, Default makes sure that pressing
  29. the Return key or Enter key is the same as clicking in the default button.
  30. The default button is also highlighted when the Return key or Enter key is
  31. pressed. If you are using your own filterProc, you must perform these
  32. tasks.
  33.  
  34. If the last character of a control╒s title is an ╘─╒, the control is drawn
  35. using the window╒s current font. Push buttons, check boxes, and radio
  36. buttons will look the same as if you used a CNTL resource with the useWFont
  37. variation code. This feature is especially useful for CDEVs. If you need a
  38. default button that uses the window╒s font, end the button╒s title with
  39. ╘─@╒.
  40.  
  41. ___Compatibility___
  42.  
  43. Default should work on any model of Macintosh with any System version.
  44. Default is 32-bit clean. Except for drawing the outline, Default lets the
  45. System file╒s CDEF 0 do practically everything. Thus, Default╒s buttons do
  46. anything that normal buttons do.
  47.  
  48. Be warned that Default uses the contrlData field of a ControlRecord (which
  49. is okay since it is reserved for CDEFs). If your application does something
  50. strange with this field, Default will not work.
  51.  
  52. When you drag or resize a default button in ResEdit, you may notice some
  53. slight flickering. This occurs because ResEdit does not know about the
  54. outline so Default forces ResEdit to refresh portions of the window.
  55. Default only behaves this way in ResEdit. This does not occur in normal
  56. applications. Default now comes in versions with and without the ResEdit
  57. updating code. This may be helpful if you are concerned about your
  58. application╒s size.
  59.  
  60. ___Bugs___
  61.  
  62. The outline will not update if the outline needs updating and the button
  63. does not, and UpdtControl or UpdtDialog is being used to update the
  64. controls. This problem does not occur with normal modal dialogs and occurs
  65. rarely with modeless dialogs. Unfortunately, there doesn╒t seem to be a
  66. clean solution this problem. If you have this problem, you can call
  67. Draw1Control for the default button on every update event or simply use
  68. DrawControls or DrawDialog instead.
  69.  
  70. If you have a default button and you aren╒t using a filterProc, pressing
  71. the Return key or Enter key will click in the default button even if the
  72. button is hidden. This is a bug in the Dialog Manager. If you have this
  73. problem, you must change the default button to a normal button before you
  74. call HideDItem or HideControl.
  75.  
  76. Please report any other bugs to any of the addresses listed below. Thanks
  77. to those programmers who did unusual things with their buttons, reported
  78. bugs, and helped make Default more robust.
  79.  
  80. ___History___
  81.  
  82. 1.0╩╤╩first release version
  83. 1.1╩╤╩fixed bug with HideControl and default buttons
  84. 1.2╩╤╩updated to support new 32-bit clean CDEF messages
  85. 1.3╩╤╩fixed bug with DragControl
  86. 1.4╩╤╩fixed bug converting between default buttons and normal buttons;
  87. ╩ ╩╩╩╩improved outlines for unusually sized default buttons
  88. 1.5╩╤╩forced ResEdit to refresh default buttons correctly
  89. 2.0 ╤ added automatic Return and Enter support for default buttons; added
  90.       window font feature for push buttons, check boxes, and radio buttons;
  91.       restructured code to reduce size of CDEF
  92. 2.1╩╤╩updated to follow Apple╒s new way of drawing default outlines
  93.  
  94. ___Distribution___
  95.  
  96. Default is copyrighted but it is also available free of charge. You may
  97. copy and redistribute Default provided that this documentation accompanies
  98. any redistributed copies of Default and the Default CDEF is not modified in
  99. any way.
  100.  
  101. You may include Default in any commercial or non-commercial software that
  102. you distribute provided that the Default CDEF is not modified in any way
  103. and that Lim Unlimited is given a free, fully functional, and fully
  104. supported copy of your software. You are not required to include a
  105. copyright notice for Default in your software.
  106.  
  107. The source code to Default is now available on request. You can get a copy
  108. via electronic mail or by sending a stamped self-addressed envelope and a
  109. disk via postal mail. The source code may not be redistributed without the
  110. permission of Lim Unlimited. You may not distribute modified versions of
  111. the source code or any software derived from the source code.
  112.  
  113. Lim Unlimited
  114. Postal:╩330 W. Iris, Stockton, CA  95210, U.S.A.
  115. Internet:╩lim@iris.ucdavis.edu
  116. America Online:╩LimUnltd
  117. CompuServe:╩72647,660
  118.